package net.lab1024.sa.admin.module.business.event.domain.form;

import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.deser.std.NumberDeserializers;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import java.math.BigDecimal;
import lombok.Data;
import net.lab1024.sa.base.common.json.deserializer.DictDataDeserializer;
import net.lab1024.sa.base.common.json.deserializer.FileKeyVoDeserializer;

/**
 * 事件表 更新表单
 *
 * @Author 骆伟林
 * @Date 2025-11-04 09:05:22
 * @Copyright 软件需求工程第八组
 */

@Data
public class EventUpdateForm {

    @Schema(description = "事件id", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "事件id 不能为空")
    private String eventId;

    @Schema(description = "地点id", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "地点id 不能为空")
    @JsonDeserialize(using = NumberDeserializers.LongDeserializer.class)
    private Long addressId;

    @Schema(description = "图片id", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "图片id 不能为空")
    private Long pictureId;

    @Schema(description = "地点名称", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "地点名称 不能为空")
    private String addressName;

    @Schema(description = "时间名称", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotBlank(message = "时间名称 不能为空")
    private String eventName;

    @Schema(description = "事件类型", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotBlank(message = "事件类型 不能为空")
    @JsonDeserialize(using = DictDataDeserializer.class)
    private String eventType;

    @Schema(description = "事件详情")
    private String eventInfo;

    @Schema(description = "经度", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "经度 不能为空")
    private BigDecimal longitude;

    @Schema(description = "维度", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "维度 不能为空")
    private BigDecimal latitude;

    @Schema(description = "附件")
    @JsonDeserialize(using = FileKeyVoDeserializer.class)
    private String annex;

    @Schema(description = "图像X坐标", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "图像X坐标 不能为空")
    private String viewerX;

    @Schema(description = "图像Y坐标", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "图像Y坐标 不能为空")
    private String viewerY;

}